import constant from './constant';

// 存储变量名
let storageKey = 'storage_data';

// 存储节点变量名
let storageNodeKeys = [constant.SYS_CONSIGNOR];

// 存储的数据
let storageData = uni.getStorageSync(storageKey) || {};

const storage = {
  set: function (key, value) {
    uni.setStorageSync(key, value);
  },
  get: function (key) {
    return uni.getStorageSync(key) || '';
  },
  remove: function (key) {
    uni.removeStorageSync(key);
  },
  clean: function () {
    uni.clearStorageSync();
  }
};

export default storage;
